﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace UniversityStudentManagemnetSystem.DAO.DAL
{
    public class Credit
    {
        private double assignedCredits;
        private double performingCredits;
        private double remainingCredits;

        public Credit()
        {
            assignedCredits = 0;
            performingCredits = 0;
            remainingCredits = 0;
        }

        public double AssignedCredits
        {
            get { return assignedCredits; }
            set { assignedCredits = value; }
        }

        public double PerformingCredits
        {
            get { return performingCredits; }
            set { performingCredits = value; }
        }

        public double RemainingCredits
        {
            get
            {
                if (assignedCredits > performingCredits)
                {
                    remainingCredits = assignedCredits - performingCredits;
                    return remainingCredits;
                }
                else
                {
                    remainingCredits = 0;
                    return remainingCredits;
                }
            }
        }
    }
}
